﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <title>MLSMooc医学检验学慕课</title>
    <!-- CSS -->
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="css/clearfix.css" />
    <!-- /CSS -->
    <!--[if lt IE 9]>
        <script src="js/html5.js">IE7_PNG_SUFFIX=".png";</script>
    <![endif]-->
    <script src="js/jquery.min.js" type="text/javascript"></script>

    <script src="jquerypdf/js/jquery.media.js"></script>
    <script src="js/menu.js" type="text/javascript"></script>
    <script src="js/footer.js" type="text/javascript"></script>
    <script src="js/picture2.js" type="text/javascript"></script>
    <script src="js/jquery.cookie.js"></script>
    <script src="../JS/Course.js"></script>
    <script src="js/header.js" type="text/javascript"></script>
    <link href="../layui-v2.6.8/layui/css/layui.css" rel="stylesheet" />
    <script src="../layui-v2.6.8/layui/layui.js"></script>

</head>
<body>
    <div class="go-top dn" id="go-top">
        <a href="javascript:;" class="go"></a>
    </div>
    <div class="allwraper">
        <div class="allcontainer clearfix">
            <div class="headerwraper"></div>

            <div class="containerwraper">
                <div class="container">
                    <div class="secmenu">
                        <ul class="menu">
                            <li class="home" onclick="location='index.html'"><a>home</a></li>
                            <li class="small">
                                <a>课程目录</a>
                                <ul class="one" id="mainmenu">
                                </ul>
                            </li>
                        </ul>
                        <div id="caidan" class="navi_wraper">
                            <!--<ul class="navi">
                                <li class="one"><a href="Project.html"><span id="ProjectNameTitle"></span></a></li>
                                <li class="two"><a><span id="CourseNameTitle"></span></a></li>
                            </ul>-->

                        </div>
                    </div>

                    <div class="coursecont">
                        <!--<div class="point_wraper">
        <div id="Top" class="point">

        </div>
        <div id="title" class="title"></div>
    </div>-->
                        <div class="layui-row">
                            <div class="layui-col-md12">
                                <div class="table-responsive">
                                    <table class="layui-table text-center">
                                        <thead id="ExamInfoHead">
                                            <tr>
                                                <th>题目</th>
                                                <th>状态</th>
                                                <!--<th>首页推荐</th>-->
                                                <th>正确答案</th>
                                                <th>选择答案</th>
                                                <th>得分</th>
                                            </tr>
                                        </thead>
                                        <tbody id="AnswerBody">
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>



                </div>
            </div>
        </div>
    </div>
    <div class="footerwraper">

    </div>
</body>

</html>
<script>
    $(function () {
        var res = window.location.search;
        var resdata = res.split(",")
        var uid;
        var cid;
        if (res == "") {

        } else {
            if (resdata.length <= 2) {
                uid = resdata[0].split("=")[1]
                cid = resdata[1].split("=")[1];
                Get3DScoreInfo(uid, cid)
            }

        }
    })
    function Get3DScoreInfo(Aid, Cid) {
        $("#AnswerBody").empty();
        var obj = {};
        obj.Aid = Aid;
        obj.Cid = Cid;
        $.ajax({
            url: virualpath +'/Exam/GetMoocScoreInfo',
            type: 'post',
            async: false,
            data: JSON.stringify(obj),
            contentType: 'application/json',
            headers: {
                "token": sessionStorage.getItem("NewToken")
            },
            success: function (data) {
                var ListStr = "";
                var res = JSON.parse(data);
                if (res != undefined) {
                    for (var i = 0; i < res.length; i++) {
                        if (res[i].Score == 0) {
                            ListStr += '<tr><td>' + res[i].Topic + '</td><td>×</td><td>' + res[i].RightAnswerText + '</td><td>' + res[i].SelectOption + '</td><td>' + res[i].Score + '</td></tr>';
                        } else {
                            ListStr += '<tr><td>' + res[i].Topic + '</td><td>√</td><td>' + res[i].RightAnswerText + '</td><td>' + res[i].SelectOption + '</td><td>' + res[i].Score + '</td></tr>';
                        }

                    }
                    $("#AnswerBody").append(ListStr);
                } else {
                    $("#AnswerBody").append("<th>暂无内容</th>");
                }
            }
        })
    }
</script>
